<template>
  <div class="app-container">
    <div v-if="truckDivShow">
      <div style="background-color: white; border-radius: 10px; height: 100px;margin-left: 10px;text-align: center;padding-top: 30px">
        <!-- 多条件分页查询所需条件的form -->
        <el-form :inline="true"  :model="truckDto" class="demo-form-inline">
          <el-form-item label="任务编号">
            <el-input ref="inputRef" v-model="Task_transportDto.id" placeholder="请输入车牌号码"></el-input>
          </el-form-item>
          <el-form-item label="司机名称">
            <el-input ref="inputRef" v-model="Task_transportDto.name" placeholder="请输入司机名称"></el-input>
          </el-form-item>
          <el-form-item label="任务状态">
            <el-select v-model="Task_transportDto.status" placeholder="请选择状态">
              <el-option label="请选择车队名称" value=""></el-option>
              <el-option label="待发车" value="1"></el-option>
              <el-option label="在途" value="2"></el-option>
              <el-option label="已到达" value="4"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="query">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="resetValues">重置</el-button>
          </el-form-item>
        </el-form>
      </div>
      <!-- end -->

      <div style="background-color: white;margin-top: 10px; margin-bottom: 20px;margin-left: 10px;border-radius: 10px;">

        <!-- 添加车辆按钮 -->
<!--        <el-button type="primary" @click="dataOperation('add')" style="margin-left: 30px;margin-top: 30px">+新增车辆</el-button>-->
        <!-- end -->

        <div style="height: 20px"></div>

        <!-- table 用于展示项目建议信息 -->
        <el-table
          v-if="truckShow"
          v-loading="trucklistLoading"
          :data="task_transportlist"
          style="width: 96%;margin-left: 32px"
          :max-height="800"
          :row-style="{ height: '55px' }"
        >
          <el-table-column fixed label="运输任务编号" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.id }}
            </template>
          </el-table-column>
          <el-table-column label="车牌号" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.transport_trips_truck_driverVo.license_plate }}
            </template>
          </el-table-column>
          <el-table-column label="调度机构" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.start_agency_name }}
            </template>
          </el-table-column>
          <el-table-column prop="name" label="起始地" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.start_agency_name }}
            </template>
          </el-table-column>
          <el-table-column prop="name" label="目的地" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.end_agency_name }}
            </template>
          </el-table-column>
          <el-table-column prop="age" label="司机" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.name }}
            </template>
          </el-table-column>
          <el-table-column prop="price" label="运输任务状态" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.status === 1 ? '待发车' : (scope.row.task_transport.status === 2 ? '在途' : (scope.row.task_transport.status === 4 ? '已到达' : (scope.row.task_transport.status === 5 ? '已完成' : '')))}}
            </template>
          </el-table-column>
          <el-table-column prop="price" label="车辆装载状态" header-align="center" align="center">
          <template slot-scope="scope">
            {{ scope.row.task_transport.status === 1 ? '半载' : (scope.row.task_transport.status === 2 ? '满载' : (scope.row.task_transport.status === 3 ? '空载' : ''))}}
          </template>
        </el-table-column>
          <el-table-column prop="type" label="计划提货时间" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.plan_pick_up_goods_time }}
            </template>
          </el-table-column>
          <el-table-column prop="attention" label="实际提货时间" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.actual_pick_up_goods_time}}
            </template>
          </el-table-column>
          <el-table-column prop="remark" label="计划发车时间" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.plan_departure_time }}
            </template>
          </el-table-column>
          <el-table-column prop="remark" label="实际发车时间" header-align="center" align="center">
            <template slot-scope="scope">
              {{ scope.row.task_transport.actual_departure_time }}
            </template>
          </el-table-column>
          <el-table-column fixed="right" label="操作" width="120" header-align="center" align="center">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="DetailsShow(scope.row)">详细信息</el-button>
<!--              <el-button @click.native.prevent="open(scope.row.id)" type="text" size="small">删除</el-button>-->
            </template>
          </el-table-column>
        </el-table>
        <!-- end --->

        <div style="height: 50px;margin-bottom: 10px">

          <!-- 分页组件 -->
          <el-pagination
            background
            @current-change="change"
            @size-change="pageSizeChange"
            :current-page="truckPageNumber"
            :page-sizes="[10, 20, 40, 80]"
            :total="truckTotal"
            layout="total, prev, pager, next, sizes,jumper"
            style="text-align: center; font-size: 8px; margin-top: 15px"
          >
          </el-pagination>
          <!-- end -->
        </div>

      </div> <!-- 间隔 -->
    </div>
    <div v-if="truckDetailsDivShow">
      <div style="background-color: white; width: 200px; height: 880px; border-radius: 10px; float: left;margin-left: 10px;text-align: center;">
        <el-link :underline="currentTab !== 'basic'" :disabled="currentTab === 'basic'" @click="handleClick('basic')" :style="{ color: currentTab === 'basic' ? '#ff8c00' : 'black' }" class="linkStyle">基本信息</el-link><br>
        <el-link :underline="currentTab !== 'license'" :disabled="currentTab === 'license'" @click="handleClick('license')" :style="{ color: currentTab === 'license' ? '#ff8c00' : 'black' }" class="linkStyle">任务轨迹</el-link><br>
        <el-link :underline="currentTab !== 'vehicle'" :disabled="currentTab === 'vehicle'" @click="handleClick('vehicle')" :style="{ color: currentTab === 'vehicle' ? '#ff8c00' : 'black' }" class="linkStyle">运单详情</el-link><br>
        <el-link :underline="currentTab !== 'uploadimage'" :disabled="currentTab === 'uploadimage'" @click="handleClick('uploadimage')" :style="{ color: currentTab === 'uploadimage' ? '#ff8c00' : 'black' }" class="linkStyle">交付照片</el-link><br>
        <el-link :underline="currentTab !== 'image'" :disabled="currentTab === 'image'" @click="handleClick('image')" :style="{ color: currentTab === 'image' ? '#ff8c00' : 'black' }" class="linkStyle">提交照片</el-link><br>
      </div>
      <div style="background-color: white; width: 1225px; height: 880px; border-radius: 10px; float: right;">
        <div v-if="baseShow">
          <div class="container">
            <h1 class="title">基本信息</h1>
            <el-button type="danger" class="close-button" @click="goBack()">×</el-button>
          </div>
          <div style="margin-left: 100px;margin-top: 40px">
            <el-form ref="form" :model="elemental" label-width="80px">
              <el-row>
                <el-col :span="12">
                  <el-form-item label="任务编号" style="width: 385px">
                    <el-input type="text" v-model="elemental.task_transport.id" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="车牌号码" style="width: 385px">
                    <el-input type="text" v-model="elemental.transport_trips_truck_driverVo.license_plate" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="调度机构" style="width: 385px">
                    <el-input type="text" v-model="elemental.start_agency_name" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="起始地" style="width: 385px">
                    <el-input type="text" v-model="elemental.start_agency_name" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="目的地" style="width: 385px">
                    <el-input type="text" v-model="elemental.end_agency_name" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </div>
          <hr style="width: 90%; height: 1px; background-color: #cccccc;">
          <div style="text-align: center">
            <el-button type="info" @click="recallButton()" style="margin-left: 30px;margin-top: 30px">返回</el-button>
          </div>
        </div>
        <div v-if="licenseShow">
          <div class="container">
            <h1 class="title">任务轨迹</h1>
            <el-button type="danger" class="close-button" @click="goBack()">×</el-button>
          </div>
          <div style="margin-left: 100px;margin-top: 40px">
            <el-form ref="form" :model="elemental" label-width="80px">
              <el-row>
                <el-col :span="12">
                  <el-form-item label="行驶证号" label-width="100px" style="width: 385px">
                    <el-input type="text" v-model="elemental.task_transport.id" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="司机" label-width="100px" style="width: 385px">
                    <el-input type="text" v-model="elemental.name" :disabled="true"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="计划发车时间" label-width="100px" style="width: 385px">
                    <el-date-picker :value-format="'yyyy-MM-dd'" type="date" v-model="elemental.task_transport.plan_departure_time" :disabled="true" style="width: 287px"></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="实际发车时间" label-width="100px" style="width: 385px">
                    <el-date-picker :value-format="'yyyy-MM-dd'" type="date" v-model="elemental.task_transport.actual_departure_time" :disabled="true" style="width: 287px"></el-date-picker>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="计划到达时间" label-width="100px" style="width: 385px">
                    <el-date-picker :value-format="'yyyy-MM-dd'" type="date" v-model="elemental.task_transport.plan_arrival_time" :disabled="true" style="width: 287px"></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="实际到达时间" label-width="100px" style="width: 385px">
                    <el-date-picker :value-format="'yyyy-MM-dd'" type="date" v-model="elemental.task_transport.actual_arrival_time" :disabled="true" style="width: 287px"></el-date-picker>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-button @click="dialogVisible = true" >轨迹查看</el-button>

            </el-form>
          </div>
          <hr style="width: 90%; height: 1px; background-color: #cccccc;">
          <div style="text-align: center">
            <el-button type="info" @click="goBack()" style="margin-left: 30px;margin-top: 30px">取消</el-button>
          </div>
        </div>
        <div v-if="lineTruckNumShow">
          <div class="container">
            <h1 class="title">共计{{this.count}}票运单</h1>
            <el-button type="danger" class="close-button" @click="goBack()">×</el-button>
          </div>
            <el-table
              v-if="truckShow"
              v-loading="trucklistLoading"
              :data="this.transport"
              style="width: 96%;margin-left: 32px"
              :max-height="800"
              :row-style="{ height: '55px' }"
            >
              <el-table-column fixed label="运单编号" header-align="center" align="center">
                <template slot-scope="scope">
                  {{ scope.row.id }}
                </template>
              </el-table-column>
              <el-table-column label="下单时间" header-align="center" align="center">
                <template slot-scope="scope">
                  {{ scope.row.orderVo.createTime }}
                </template>
              </el-table-column>
              <el-table-column label="发件人电话" header-align="center" align="center">
                <template slot-scope="scope">
                  {{ scope.row.orderVo.senderPhone }}
                </template>
              </el-table-column>
              <el-table-column prop="name" label="发件人地址" header-align="center" align="center">
                <template slot-scope="scope">
                  {{ scope.row.orderVo.senderAddress }}
                </template>
              </el-table-column>
              <el-table-column prop="name" label="货品数量" header-align="center" align="center">
                <template slot-scope="scope">
                  {{ scope.row.orderVo.totalQuantityOfOrderedGoods }}
                </template>
              </el-table-column>
              <el-table-column fixed="right" label="操作" width="120" header-align="center" align="center">
                <template slot-scope="scope">
                  <el-button type="text" size="small" @click="DetailsShow(scope.row)">详细信息</el-button>
                </template>
              </el-table-column>
            </el-table>

<!--            <el-form ref="form" :model="TruckNumberAndLine" label-width="80px">-->
<!--              <el-row>-->
<!--                <el-col :span="12">-->
<!--                  <el-form-item label="所属线路" label-width="100px" style="width: 385px">-->
<!--                    <el-input type="text" v-model="TruckNumberAndLine.lname" :disabled="true"></el-input>-->
<!--                  </el-form-item>-->
<!--                </el-col>-->
<!--                <el-col :span="12">-->
<!--                  <el-form-item label="所属车次" label-width="100px" style="width: 385px">-->
<!--                    <el-input type="text" v-model="TruckNumberAndLine.tname" :disabled="disabledStatus"></el-input>-->
<!--                  </el-form-item>-->
<!--                </el-col>-->
<!--              </el-row>-->
<!--            </el-form>-->
          </div>
        <div v-if="uploadimage">
          <div class="container">
            <h1 class="title">交付照片</h1>
            <el-button type="danger" class="close-button" @click="goBack()">×</el-button>
          </div>
          <div style="margin-left: 100px;margin-top: 40px">
            <el-row>
              <el-col :span="8">
                <el-card :body-style="{ padding: '0px' }">
                  <el-image :src="this.cargo_pick_up_picture">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture-outline"></i>
                    </div>
                  </el-image>
                  <div style="padding: 14px;">
                    <span>提货货品照片</span>
                  </div>
                </el-card>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-card :body-style="{ padding: '0px' }">
                  <el-image :src="this.cargo_picture">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture-outline"></i>
                    </div>
                  </el-image>
                  <div style="padding: 14px;">
                    <span>提货凭证照片</span>
                  </div>
                </el-card>
              </el-col>
            </el-row>
          </div>
          <hr style="width: 90%; height: 1px; background-color: #cccccc;">
          <div style="text-align: center">
            <el-button type="info" @click="goBack()" style="margin-left: 30px;margin-top: 30px">取消</el-button>
          </div>
        </div>

        <div v-if="image">
          <div class="container">
            <h1 class="title">交付照片</h1>
            <el-button type="danger" class="close-button" @click="goBack()">×</el-button>
          </div>
          <div style="margin-left: 100px;margin-top: 40px">
            <el-row>
              <el-col :span="8">
                <el-card :body-style="{ padding: '0px' }">
                  <el-image :src="this.transport_certificate">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture-outline"></i>
                    </div>
                  </el-image>
                  <div style="padding: 14px;">
                    <span>提货货品照片</span>
                  </div>
                </el-card>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-card :body-style="{ padding: '0px' }">
                  <el-image :src="this.deliver_picture">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture-outline"></i>
                    </div>
                  </el-image>
                  <div style="padding: 14px;">
                    <span>提货凭证照片</span>
                  </div>
                </el-card>
              </el-col>
            </el-row>
          </div>
          <hr style="width: 90%; height: 1px; background-color: #cccccc;">
          <div style="text-align: center">
            <el-button type="info" @click="goBack()" style="margin-left: 30px;margin-top: 30px">取消</el-button>
          </div>
        </div>
          <hr style="width: 90%; height: 1px; background-color: #cccccc;">
        <div>
          <el-dialog
            title="轨迹查看"
            :visible.sync="dialogVisible"
            width="80%"
            height="40%"
            :before-close="handleClose">
            <amaps :longitudeandlatitude="this.longitudeandlatitude"></amaps>
            <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
          </span>
          </el-dialog>
        </div>
        </div>
      </div>
    </div>

</template>

<script>
import { deleteTruck } from '@/api/truck/truck_manage'
import {
  getimageUrl,
  gettask_transportPage,
  ObtainWaybillBasedOnTransportationID,
  querytasktransport
} from '@/api/work/tasktransport'
import imageUpload from '@/components/ImageUpload/index.vue'
import GaodeApi from '@/views/GaodeApi.vue'
import * as AMapLoader from 'runjs/lib/script'
import Amaps from '@/views/work/AMap.vue'


window._AMapSecurityConfig = {
  securityJsCode:'e20a12abcb1fab184da9574c7eaee0b9'
};

export default {
  name: 'tasktransport',
  components: { Amaps },
  computed: {

    imageUpload() {
        imageUpload,
        GaodeApi
    }
  },
  data(){
    return {
      longitudeandlatitude:{
        start_latitude:'',
        start_longitude:'',
        end_latitude:'',
        end_longitude:''
      },
      dialogVisible: false,
      firstArr: [116.478935, 39.997761],
      deliver_picture:'',
      transport_certificate:'',
      cargo_pick_up_picture:'',
      cargo_picture:'',
      uploadimage:false,
      image:false,
      lineTruckNumShow:false,
      licenseShow:false,
      baseShow:false,
      currentTab: 'basic',
      truckDivShow:true,
      truckDetailsDivShow: false,
      selectedValue: '',
      fleet:[],
      truck_type:[],
      logo: 'add',
      truckShow:true,
      age1:'',
      age2:'',
      title:'添加项目',
      drawer: false,
      Task_transportDto:{
        id:'',
        name:'',
        status:null
      },
      elemental:{
      },
      transport:[],
      task_transportlist: null,
      count:0,
      trucklistLoading: true,
      truckPageNumber: 1,
      truckPageSize: 10,
      truckTotal: 0,
      options:[]
    }
  },
  created() {
    this.init()
  },
  methods:{
    query(){
      this.truckPageNumber = 1;
      this.init()
    },
    init(){
      this.trucklistLoading = true

      const dto = {
        pageNum: this.truckPageNumber,
        pageSize: this.truckPageSize,
        id: this.Task_transportDto.id,
        name: this.Task_transportDto.name,
        status: this.Task_transportDto.status
      }
      console.log(dto)
      gettask_transportPage(dto).then(response=>{
        this.task_transportlist = response.data.list
        this.trucklistLoading = false
        this.truckTotal = response.data.total
        this.truckShow = true
      })
    },
    goBack(){
      this.image = false
      this.licenseShow = false
      this.lineTruckNumShow = false
      this.currentTab = 'basic'
      this.uploadimage = false
      this.image = false
      this.truckDivShow = true
      this.truckDetailsDivShow = false
      this.TruckDetails={
        id:null,
        agency:null,
        fName:null,
        license_plate:null,
        tName:null,
        allowable_load:null,
        allowable_volume:null,
        device_gps_id:null,
        work_status:null,
        load_status:null,
        status:null
      }
    },
    handleClick(tab) {
      querytasktransport(this.elemental.task_transport.id).then(response=>{
        this.count = response.data
      })
      this.currentTab = tab;
      this.saveButton = false
      if (tab === "basic"){
        this.baseShow = true
        this.licenseShow = false
        this.lineTruckNumShow = false
        this.uploadimage = false
        this.image = false
      }else if (tab === "license"){
        this.licenseShow = true
        this.baseShow = false
        this.lineTruckNumShow = false
        this.uploadimage = false
        this.image = false
      }else if(tab === "vehicle"){
        this.licenseShow = false
        this.baseShow = false
        this.lineTruckNumShow = true
        this.transport = []
        new ObtainWaybillBasedOnTransportationID(this.elemental.task_transport.id).then(response=>{
          this.transport = response
          this.onMounted()
        })
        this.uploadimage = false
        this.image = false
      }else if(tab === "uploadimage"){
        this.licenseShow = false
        this.baseShow = false
        this.lineTruckNumShow = false
        this.uploadimage = true
        const images = {
          image1 : this.elemental.task_transport.cargo_pick_up_picture,
          image2 : this.elemental.task_transport.cargo_picture
        }
        getimageUrl(images).then(response=>{
          this.cargo_pick_up_picture = response.data.image1
          this.cargo_picture = response.data.image2
        })
        this.image = false
      }else {
        this.licenseShow = false
        this.baseShow = false
        this.lineTruckNumShow = false
        this.uploadimage = false
        this.image = true
        const images = {
          image1 : this.elemental.task_transport.transport_certificate,
          image2 : this.elemental.task_transport.deliver_picture
        }
        getimageUrl(images).then(response=>{
          this.transport_certificate = response.data.image1
          this.deliver_picture = response.data.image2
        })
      }
    },
    recallButton(){
      this.goBack()
    },
    DetailsShow(data){
      this.elemental = data;
      this.longitudeandlatitude = {
        start_latitude:this.elemental.start_latitude,
        start_longitude:this.elemental.start_longitude,
        end_latitude:this.elemental.end_latitude,
        end_longitude:this.elemental.end_longitude
      }
      this.truckDivShow = false
      this.baseShow = true
      this.truckDetailsDivShow = true;
    }
    ,
    resetValues() {
      this.$refs.inputRef.clear(); // 清空输入框的值
      this.truckDto.truck_type_id=''
      this.truckDto.fleet_id='' // 清空下拉列表框的选中项
    }
    ,
    change(val){
      this.truckPageNumber = val;
      this.init();
    },
    pageSizeChange(newPageSize) {
      this.truckPageSize = newPageSize;

      this.init()
    },
    agree(logo){
      if(logo==='add'){
        this.saveEvaluate()
      }else{
        this.modify()
      }
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          this.form = {
            te_id:0,
            sportName: '',
            gender: null,
            intensity: null,
            equivalent: '',
            age:this.age1+this.age2,
            time: '',
            part: null,
            method: '',
            notes: '',
            status:null
          },
            this.age1=null
          this.age2=null
          done();
        })
        .catch(_ => {});
    },
    //删除车辆信息(其实就是修改车辆状态)
    excise(truck){
      deleteTruck(truck).then(response=>{
        this.$message(response.message)
        this.init()
      })
    },
    // open(id) {
    //   const truck={
    //     id:id,
    //     status:0
    //   }
    //   const h = this.$createElement;
    //   this.$msgbox({
    //     title: '消息',
    //     message: h('p', null, [
    //       h('span', null, '你确定要删除此车辆吗? '),
    //     ]),
    //     showCancelButton: true,
    //     confirmButtonText: '确定',
    //     cancelButtonText: '取消',
    //     beforeClose: (action, instance, done) => {
    //       if (action === 'confirm') {
    //         this.excise(truck)
    //         done()
    //       } else {
    //         done();
    //       }
    //     }
    //   })
    // },
    handleAvatarSuccess(res) {
      this.TruckLicense.picture = res.data
    },
  }
}
</script>

<style scoped lang="scss">
.app-container{
  width: 100%;
  height: 908px;
  background-color: #f1f1f1; /* 设置背景颜色 */
}
.linkStyle{
  font-size: 14px;
  margin: 10px 0;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
.container {
  display: flex;
  align-items: center;
}

.title {
  margin-left: 50px;
  margin-top: 30px;
  margin-right: 20px; /* 调整按钮与标题之间的间距 */
  color: black;
}

.close-button {
  margin-left: 900px; /* 将按钮推到最左边 */
}
.el-form-item .el-form-item__label {
  width: auto; /* 自适应宽度 */
  white-space: nowrap; /* 不换行 */
}

.avatar-uploader .el-upload {
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
  border: 1px dashed #99a9bf;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>
